Skip to content

honor psql's exit status (fixes #6)#8

Open
breunigs wants to merge 1 commit intogbb:masterfrom
breunigs:pass-exit-code
Open

honor psql's exit status (fixes #6)#8
breunigs wants to merge 1 commit intogbb:masterfrom
breunigs:pass-exit-code

Conversation

@breunigs
Copy link

The sub-shells exit code wasn't checked, so even if psql exited with a non-zero status code, par_psql would continue. We can check this directly for sequential queries, but need to do some housekeeping for the background processes.

It is possible to exit immediately upon encountering a failed sub-shell, but the later ones might still be running and print into the terminal, leaving a dirty prompt.

The exit code 3 is what psql -v ON_ERROR_STOP=1 returns.

The sub-shells exit code wasn't checked, so even if psql exited with
a non-zero status code, par_psql would continue. We can check this
directly for sequential queries, but need to do some housekeeping
for the background processes.

It is possible to exit immediately upon encountering a failed
sub-shell, but the later ones might still be running and print
into the terminal, leaving a dirty prompt.

The exit code `3` is what `psql -v ON_ERROR_STOP=1` returns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant